feat(x2a): Track and display commit ID per job#2364
feat(x2a): Track and display commit ID per job#2364eloycoto merged 5 commits intoredhat-developer:mainfrom
Conversation
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
867db48 to
5b961c3
Compare
| PUSH_FAILED="Failed to push to ${TARGET_REPO_URL} branch ${TARGET_REPO_BRANCH}" | ||
| echo "ERROR: ${PUSH_FAILED}" | ||
| else | ||
| COMMIT_ID=$(git rev-parse HEAD 2>/dev/null || echo "") |
There was a problem hiding this comment.
This else is not really needed, no? You don't need to push to get the commit id, can be before pushing it, after:
git pull --rebase origin "${TARGET_REPO_BRANCH}" 2>/dev/null || true
There was a problem hiding this comment.
if you don't push it to the remote, the commitID won't mean anything to the user
There was a problem hiding this comment.
ok, I'll remove it
| 'Il modulo è già stato pubblicato. Riavvia la pubblicazione per aggiornare il repository di destinazione.', | ||
| 'modulePage.phases.rerunPublish': | ||
| 'Ripubblica nel repository di destinazione', | ||
| 'modulePage.phases.commitId': 'Ultimo ID commit', |
There was a problem hiding this comment.
| 'modulePage.phases.commitId': 'Ultimo ID commit', | |
| 'modulePage.phases.commitId': 'Último ID commit', |
There was a problem hiding this comment.
Lol, send a patch to the automatic translator 🤣
There was a problem hiding this comment.
wait, this is Italian... not sure about that
c6084c6 to
353f009
Compare
|



User description
This PR will introduce tracking and displaying of cimmit id per job, to keep track for the "latest commit on the target repository created by the x2a job"
UPDATE: tested after commitID reporting was merged on x2a-converter, and is working great
page so users can trace exactly which commit a phase produced.
capture the SHA via git rev-parse HEAD after a successful push.
JIRA: https://issues.redhat.com/browse/FLPATH-3297
PR Type
Enhancement
Description
Add
commit_idcolumn to jobs table for tracking git commitsExtend OpenAPI spec and collectArtifacts endpoint to accept commitId
Update job shell script to capture SHA via git rev-parse HEAD
Display "Last Commit ID" field on Module page per phase tab
Add internationalization support for commit ID label (DE, ES, FR, IT)
Diagram Walkthrough
File Walkthrough
1 files
Add commit_id column to jobs table1 files
Extend collectArtifacts endpoint with commitId parameter4 files
Add commitId field to Job model interfaceAdd commitId to collectArtifacts request modelAdd commitId field to client-side Job modelAdd commitId to client-side request model2 files
Update OpenAPI spec with commitId field definitionsDefine commitId in OpenAPI specification1 files
Add commitId parameter to updateJob method signature1 files
Include commit_id in job queries and update operations1 files
Map commit_id database field to commitId model property5 files
Add German translation for Last Commit ID labelAdd Spanish translation for Last Commit ID labelAdd French translation for Last Commit ID labelAdd Italian translation for Last Commit ID labelAdd English reference translation for commit ID1 files
Capture and report commit SHA after successful push2 files
Document commitId in public API reportDocument commitId translation key in API report1 files
Display Last Commit ID field on Module page